
<!--startprint-->
<div id="billboy">
    <div id='userdetail'>
        <style>
            #billboy{
                font-size: 8px;
                width: 75%;

            }
            #userdetail{
                line-height: 36px;
                padding-left: 20px;
                padding-bottom: 10px;
                line-height: 12px;
            }
            #billdetail{
                padding-left: 20px;
                padding-bottom: 10px;
                padding-top:10px;
            }
            #billboy table td{
                border: 1px solid #CCCCCC;
            }
            #packdetail table td{
                border: 1px solid #CCCCCC;
            }
            #bf{
                background-color: #ddd;
                text-align: right;
                width: 120px;
                line-height: 30px;
                font-size: 8px;
            }
            #cf{
                font-size: 12px;
            }
            #gf{
                text-align: center;
                background-color: #ddd;
                height: 36px;
            }
            #hf{
                text-align: center;
                font-size:8px;
            }
        </style>
        <div style="line-height: 30px;">优惠券详情信息</div>
        <table width="90%" border="1" cellpadding="0" cellspacing="0">
            <tr>
              <td id='bf' height="36px">仓库号：</td>
              <td id='cf' colspan="3">&nbsp;&nbsp;<?php echo $this->couponItem->user->storeno;?>&nbsp;&nbsp;(ID:<?php echo $this->couponItem->user->id;?>&nbsp;呢称:<?php echo $this->couponItem->user->nikename;?>)</td>
            </tr>
            <tr>
              <td id='bf'>优惠券序号：</td>
              <td id='cf'>&nbsp;&nbsp;<?php echo $this->couponItem->no;?></td>
              <td id='bf'>密码：</td>
              <td id='cf'>&nbsp;&nbsp;<?php echo $this->couponItem->password;?></td>
            </tr>
            <tr>
              <td id='bf'>状态：</td>
              <td id='cf' colspan="3">&nbsp;&nbsp;<?php echo $this->couponItem->statusName;?></td>
            </tr>
            <tr>
              <td id='bf'>使用时间：</td>
              <td id='cf'>&nbsp;&nbsp;<?php echo $this->couponItem->useTime;?></td>
              <td id='bf'>创建时间：</td>
              <td id='cf'>&nbsp;&nbsp;<?php echo $this->couponItem->dateCreated;?></td>
            </tr>
            <tr>
              <td id='bf'>开始时间：</td><td id='cf'>&nbsp;&nbsp;<?php echo $this->couponItem->startTime;?></td>
              <td id='bf'>结束时间：</td><td id='cf'>&nbsp;&nbsp;<?php echo $this->couponItem->dateExpired;?></td>
            </tr>
            <tr>
              <td id='bf'>底线金额：</td><td id='cf'>&nbsp;&nbsp;￥<?php echo $this->couponItem->money?$this->couponItem->money:0;?></td>
              <td id='bf'>折扣：</td><td id='cf'>&nbsp;&nbsp;￥<?php echo $this->couponItem->discount;?></td>
            </tr>
            <tr>
              <td id='bf'>使用范围：</td><td id='cf'>&nbsp;&nbsp;<?php echo $this->couponItem->scopeName;?></td>
              <td id='bf'>批次序号：</td><td id='cf'>&nbsp;&nbsp;<?php echo $this->couponItem->batchNo;?></td>
            </tr>
            <tr>
              <td id='bf'>批次名称：</td><td id='cf' colspan="3">&nbsp;&nbsp;<?php echo  $this->couponItem->name;?></td>
            </tr>
            <tr>
              <td id='bf'>备注：</td><td colspan="3" id='cf'>&nbsp;&nbsp;<?php echo $this->couponItem->common;?></td>
            </tr>
          </table>
    </div>
</div>
    <!--endprint--> 
    <div style='padding-top:10px;padding-bottom: 5px;padding-left: 20px;' id="div_button">
        <input type="button" id="prompt" naem="prompt" value="提示快过期" style="background-color: #FF8312;width: 80px;height: 30px;color: white;font-size: 14px;border-radius:8px;"/>
        <input type="button" id="refo" naem="refo" value="返回" style="background-color: #1668A4;width: 80px;height: 30px;color: white;font-size: 14px;border-radius:8px;"/>
    </div>

<script type="text/javascript">
    $("#refo").click(function(){
        location.href = "/admini/manageuser/coupon"; 
    });
    $("#prompt").click(function(){
        if(confirm("您确定提示该用户优惠券快过期了？","提示信息")){  
        $.post('/admini/manageuser/endcoupon', {'userid':<?php echo $this->couponItem->user->id;?>,'id':<?php echo $this->couponItem->id;?>}, function(data){
                if(data == 1){
                    alert("提示成功");
                }else{
                    alert("出现未知错误，请重新提示");
                }
            }, 'json');
        }
    });
</script>